package com.jic.manager.enums;


/**
 * 
 * 部门类型枚举
 *
 */
public enum RoleTypeEnum {
	ADD_TYPE("1", "新增"),
	EDIT_TYPE("2", "编辑"),
	DELETE_TYPE("3", "删除"),

	;

	private String type;
	private String typeDesc;


	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getTypeDesc() {
		return typeDesc;
	}

	public void setTypeDesc(String typeDesc) {
		this.typeDesc = typeDesc;
	}

	private RoleTypeEnum(String type, String typeDesc){
		this.type = type;
		this.typeDesc = typeDesc;
	}


	public static String getRoleTypeDescByType(String status) {
		if(status == null){
			return "";
		}
		String statusName = null;
		for (RoleTypeEnum enumVal : RoleTypeEnum.values()) {
			if (enumVal.getType().equals(status)) {
				statusName = enumVal.getTypeDesc();
				break;
			}
		}
		return statusName;
	}
}
